The d-pad’s vertical axis: -1 (Up), 0, or 1 (Down). Both held at once cancels to 0. Add a player number from 1 to 4 to ask another controller: btn_dy(2).
btn_dy(player = 1) -> int| Name | Type |
|---|---|
player | int (can be left out; then it is 1) |
int
The d-pad's vertical axis, read as a single number: -1 while Up is held, 1 while Down is held, 0 otherwise - the vertical twin of btn_dx. Holding both Up and Down at once cancels back to 0.
Write a player number from 1 to 4 in the brackets to read that player's d-pad: btn_dy(2). Leave it out and it is player 1, the same as writing 1. The number has to be written out in the call (not kept in a variable), and a console that has fewer controllers than that tells you so when you check the game: the Game Boy Advance has one, so only player 1 works there.
vsp = btn_dy() * 1.5;Drives vertical movement straight off the d-pad's own axis reading - paired with the btn_dx() example this gives ordinary 8-way top-down movement in two lines.
The Game Boy Advance has one controller, so only player 1 can be asked here (written out or left out, it is the same call).